<!doctype html>
<html>
  <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-132775238-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-132775238-1');
    </script>

    <script>
      function getRapiDoc(){
        return document.getElementById("thedoc");
      }  

      function scrollWithAPI() {
        let docEl = getRapiDoc();
        docEl.scrollTo("get-/closed");
      }
    </script>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
    <script type="text/javascript" src="../rapidoc-min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&family=Roboto+Mono&display=swap" rel="stylesheet">
    <link href='../index.css' rel='stylesheet'>
  </head>
  <body>
    <rapi-doc 
      id="thedoc"
      spec-url="../specs/collapsable.yaml" 
      show-header = "false"
      mono-font = "Roboto Mono"
      regular-font = 'Open Sans'
      render-style= "focused"
    > 

      <div style="padding:16px; display: flex;justify-content: center; align-items: center;">
        <span>Use</span> <span class='mono' style="margin: 0 5px;">scrollTo()</span> <span> method to goto : </span>
        <button class="btn normal" onclick="document.getElementById('thedoc').scrollTo('overview')">
          Overview
        </button>
        <button class="btn normal" style="width:190px" onclick="document.getElementById('thedoc').scrollTo('get-/path1-in-closed-tag')">
          valid path (in collapsed tag)
        </button>
        <button class="btn normal" style="width:140px" onclick="document.getElementById('thedoc').scrollTo('an-incorrect-path')">
          non-existant path
        </button>
      </div>
  </rapi-doc>
  </body>
</html>